package com.heima.fallback;

import com.heima.feign.UserFeignClient;
import com.heima.model.common.dtos.ResponseResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author chenshan
 */
@Component
public class UserClientFallback implements FallbackFactory<UserFeignClient> {
    @Override
    public UserFeignClient create(Throwable throwable) {
        return new UserFeignClient() {
            @Override
            public Integer selectUserId() {
                return null;
            }
        };
    }
}
